package uk.me.dewi.util;

public class ArrayUtils {

    public static String join(Object[] objects, String separator){
        if(objects == null || objects.length == 0) return "";
        
        StringBuilder sb = new StringBuilder();
        for(int i=0; i<objects.length; i++){
            sb.append(objects[i].toString());
            if(separator != null && i < objects.length - 1){
                sb.append(separator);
            }
        }
        return sb.toString();
    }
}
